package com.bestow.lease.service.impl;

import java.util.List;
import com.bestow.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bestow.lease.mapper.HlsBpMasterContactInfoMapper;
import com.bestow.lease.domain.HlsBpMasterContactInfo;
import com.bestow.lease.service.IHlsBpMasterContactInfoService;

/**
 * 商业伙伴联系信息Service业务层处理
 * 
 * @author liliu
 * @date 2022-09-26
 */
@Service
public class HlsBpMasterContactInfoServiceImpl implements IHlsBpMasterContactInfoService 
{
    @Autowired
    private HlsBpMasterContactInfoMapper hlsBpMasterContactInfoMapper;

    /**
     * 查询商业伙伴联系信息
     * 
     * @param contactInfoId 商业伙伴联系信息主键
     * @return 商业伙伴联系信息
     */
    @Override
    public HlsBpMasterContactInfo selectHlsBpMasterContactInfoByContactInfoId(Long contactInfoId)
    {
        return hlsBpMasterContactInfoMapper.selectHlsBpMasterContactInfoByContactInfoId(contactInfoId);
    }

    /**
     * 查询商业伙伴联系信息列表
     * 
     * @param hlsBpMasterContactInfo 商业伙伴联系信息
     * @return 商业伙伴联系信息
     */
    @Override
    public List<HlsBpMasterContactInfo> selectHlsBpMasterContactInfoList(HlsBpMasterContactInfo hlsBpMasterContactInfo)
    {
        return hlsBpMasterContactInfoMapper.selectHlsBpMasterContactInfoList(hlsBpMasterContactInfo);
    }

    /**
     * 新增商业伙伴联系信息
     * 
     * @param hlsBpMasterContactInfo 商业伙伴联系信息
     * @return 结果
     */
    @Override
    public int insertHlsBpMasterContactInfo(HlsBpMasterContactInfo hlsBpMasterContactInfo)
    {
        hlsBpMasterContactInfo.setCreateTime(DateUtils.getNowDate());
        return hlsBpMasterContactInfoMapper.insertHlsBpMasterContactInfo(hlsBpMasterContactInfo);
    }

    /**
     * 修改商业伙伴联系信息
     * 
     * @param hlsBpMasterContactInfo 商业伙伴联系信息
     * @return 结果
     */
    @Override
    public int updateHlsBpMasterContactInfo(HlsBpMasterContactInfo hlsBpMasterContactInfo)
    {
        hlsBpMasterContactInfo.setUpdateTime(DateUtils.getNowDate());
        return hlsBpMasterContactInfoMapper.updateHlsBpMasterContactInfo(hlsBpMasterContactInfo);
    }

    /**
     * 批量删除商业伙伴联系信息
     * 
     * @param contactInfoIds 需要删除的商业伙伴联系信息主键
     * @return 结果
     */
    @Override
    public int deleteHlsBpMasterContactInfoByContactInfoIds(Long[] contactInfoIds)
    {
        return hlsBpMasterContactInfoMapper.deleteHlsBpMasterContactInfoByContactInfoIds(contactInfoIds);
    }

    /**
     * 删除商业伙伴联系信息信息
     * 
     * @param contactInfoId 商业伙伴联系信息主键
     * @return 结果
     */
    @Override
    public int deleteHlsBpMasterContactInfoByContactInfoId(Long contactInfoId)
    {
        return hlsBpMasterContactInfoMapper.deleteHlsBpMasterContactInfoByContactInfoId(contactInfoId);
    }
}
